import request from '@/plugin/axios'

export function reqList (params) {
  return request({
    url: 'system/userperm/list',
    method: 'get',
    params
  })
}

export function reqTree (params) {
  return request({
    url: 'system/userperm/selectTree',
    method: 'get',
    params
  })
}

export function reqInfo (params) {
  return request({
    url: 'system/userperm/info/' + params,
    method: 'get'
  })
}

export function reqSave (params) {
  return request({
    url: 'system/userperm/save',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
export function reqUpdate (params) {
  return request({
    url: 'system/userperm/update',
    method: 'post',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

export function reqDelete (params) {
  return request({
    url: 'system/userperm/delete',
    method: 'DELETE',
    data: JSON.stringify(params),
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
